package com.czxy.admin.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 用户
 * @author xuhongzu
 * @version 1.0
 * @date 2019/4/24
 */
public class User implements Serializable {
    /** 用户id */
    private Integer userId;
    /** 用户名 */
    private String userName;
    /** 用户密码 */
    private String userPass;
    /** 用户昵称 */
    private String userNickname;
    /** 用户邮箱 */
    private String userEmail;
    /** 用户头像 */
    private String userAvatar;
    /** 用户上次登录ip */
    private String userLastLoginIp;
    /** 用户注册时间 */
    private Date userRegisterTime;
    /** 用户登上次录时间 */
    private Date userLastLoginTime;
    /** 用户等级 */
    private Integer userStatus;
    /** 文章数量 */
    private Integer articleCount;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(userId, user.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId);
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userPass='" + userPass + '\'' +
                ", userNickname='" + userNickname + '\'' +
                ", userEmail='" + userEmail + '\'' +
                ", userAvatar='" + userAvatar + '\'' +
                ", userLastLoginIp='" + userLastLoginIp + '\'' +
                ", userRegisterTime=" + userRegisterTime +
                ", userLastLoginTime=" + userLastLoginTime +
                ", userStatus=" + userStatus +
                ", articleCount=" + articleCount +
                '}';
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPass() {
        return userPass;
    }

    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }

    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getUserLastLoginIp() {
        return userLastLoginIp;
    }

    public void setUserLastLoginIp(String userLastLoginIp) {
        this.userLastLoginIp = userLastLoginIp;
    }

    public Date getUserRegisterTime() {
        return userRegisterTime;
    }

    public void setUserRegisterTime(Date userRegisterTime) {
        this.userRegisterTime = userRegisterTime;
    }

    public Date getUserLastLoginTime() {
        return userLastLoginTime;
    }

    public void setUserLastLoginTime(Date userLastLoginTime) {
        this.userLastLoginTime = userLastLoginTime;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Integer getArticleCount() {
        return articleCount;
    }

    public void setArticleCount(Integer articleCount) {
        this.articleCount = articleCount;
    }

    public User(Integer userId, String userName, String userPass, String userNickname, String userEmail, String userAvatar, String userLastLoginIp, Date userRegisterTime, Date userLastLoginTime, Integer userStatus, Integer articleCount) {
        this.userId = userId;
        this.userName = userName;
        this.userPass = userPass;
        this.userNickname = userNickname;
        this.userEmail = userEmail;
        this.userAvatar = userAvatar;
        this.userLastLoginIp = userLastLoginIp;
        this.userRegisterTime = userRegisterTime;
        this.userLastLoginTime = userLastLoginTime;
        this.userStatus = userStatus;
        this.articleCount = articleCount;
    }

    public User() {
    }
}